package com.cd.service.reply.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cd.bean.Reply;
import com.cd.dao.ReplyMapper;
import com.cd.service.reply.ReplyService;
/**
 * 回复留言
 * @Author hxy
 * @Date 2018-1-25
 */
@Service("replyService")
public class ReplyServiceImpl implements ReplyService{
	
	@Autowired
	ReplyMapper replyMapper;
	
	@Override
	public void save(Reply reply) throws Exception {
		replyMapper.save(reply);
		
	}

	@Override
	public List<Reply> listAll() throws Exception {
		return replyMapper.queryByList();
	}

	@Override
	public Reply findById(Integer id) throws Exception {
		return replyMapper.query(id);
	}

	@Override
	public void delete(Integer id) throws Exception {
		replyMapper.delete(id);
		
	}

	@Override
	public void edit(Reply reply) throws Exception {
		replyMapper.update(reply);
		
	}

}
